package com.qianfeng.testservice02.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author LJF
 * @Date 2020/8/5 17:36
 * @Version 1.0
 */
@RestController
@RequestMapping("/testservice02")
public class TestService02Controller {

    @GetMapping("/test01")
    public String test01(String name){
        return "Testservice02====>test01收到的name:"+name;
    }

    @GetMapping("/test02/{name}")
    public String test02(@PathVariable String name){
        return "Testservice02====>test02 rest 收到的name:"+name;
    }

    @GetMapping("/test03/{name}/{age}")
    public String test03(@PathVariable String name,@PathVariable int age){
        return "Testservice02====>test03 rest 收到的name:"+name+"   age="+age;
    }

}
